
import request from '../utils/request';
/*
* request(
*   type:fetch || axios
*   url:/api/usr/add/
*   params:{
*     method:'post' || 'get' || 'delete' || 'put'
*     data:
*   }
* )
* */
export async function getList() {
  return request('axios','/usr',{
    method:'GET',
  });
}


export async function userInfoAdd(params) {
  return request('axios','/api/usr/add', {
    method: 'POST',
    body: {
      ...params,
      method: 'post',
    },
  });
}

export async function userInfoEdit(params) {
  return request('fecth','/api/rule', {
    method: 'POST',
    body: {
      ...params,
      method: 'post',
    },
  });
}

export async function userInfoDel(params) {
  return request('fecth','/api/rule', {
    method: 'POST',
    body: {
      ...params,
      method: 'post',
    },
  });
}


export async function userInfoGet(params) {
  return request('fecth','/api/rule', {
    method: 'POST',
    body: {
      ...params,
      method: 'post',
    },
  });
}
